package com.hellobike.haxing.modules.statics.dto;

import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class OrderDetailStatics implements Serializable {
    @Excel(name = "订单编码", width = 15)
    private String billNo;
    @Excel(name = "SKU ID", width = 15)
    private Long skuId;
    @Excel(name = "SPU ID", width = 15)
    private Long spuId;
    @Excel(name = "商品编码", width = 15)
    private String barcode;
    @Excel(name = "品名", width = 15)
    private String title;
    @Excel(name = "点位ID", width = 15)
    private Long shopId;
    @Excel(name = "点位地址", width = 15)
    private String address;
    @Excel(name = "点位名称", width = 15)
    private String shopName;
    @Excel(name = "点位手机号", width = 15)
    private String mobile;
    private Integer statusInteger;
    @Excel(name = "团长姓名", width = 15)
    private String realName;
    @Excel(name = "注册手机号", width = 15)
    private String mPhone;
    @Excel(name = "收货人", width = 15)
    private String receiver;
    @Excel(name = "下单时间", width = 15)
    private String createTime;
    @Excel(name = "订单状态", width = 15)
    private String status;
    @Excel(name = "支付时间", width = 15, exportFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    @Excel(name = "单位", width = 15)
    private String unit;
    @Excel(name = "商品订单数量", width = 15)
    private Integer num;
    @Excel(name = "商品订单金额", width = 15)
    private BigDecimal productAmount;
    @Excel(name = "用户支付金额", width = 15)
    private BigDecimal payAmount;
    @Excel(name = "优惠券金额", width = 15)
    private BigDecimal couponAmount;
    @Excel(name = "成本金额", width = 15)
    private String cogsPrice;
    @Excel(name = "佣金率", width = 15)
    private BigDecimal commissionRate;

    public BigDecimal getShopAmount() {
        if (statusInteger != null && statusInteger > 10) {
            return BigDecimal.ZERO;
        }
        return shopAmount;
    }

    public void setShopAmount(BigDecimal shopAmount) {
        this.shopAmount = shopAmount;
    }

    @Excel(name = "店铺抽成", width = 15)
    private BigDecimal shopAmount;
    @Excel(name = "二级分佣金额")
    private BigDecimal leaderAmount;

    @Excel(name = "供应商", width = 15)
    private String supplierName;

}
